package Student;

/**
 * @description: 计算机系
 * @author: rock
 * @create:
 **/
public class Computer extends Student {
    private double operation;
    private double writen;
    private double midGrade;
    private double endGrade;

    public Computer(int xuehao,  String sex, int age, String name, double operation, double writen, double midGrade, double endGrade) {
        super(xuehao, age, name, sex);
        this.operation = operation;
        this.writen = writen;
        this.midGrade = midGrade;
        this.endGrade = endGrade;
    }
    public Computer(){}

    public double getGrade(){
        return operation*0.4+writen*0.2+midGrade*0.2+endGrade*0.2;

    }
}
